

function login() {
    axios.get("/user/login",{
      params:{
          name:$("nameText").value,
          pwd:$("pwdText").value
      }
    }).then(resp=>{
        let info=resp.data;
        if (info=="ok"){
            $("errorSpan").innerHTML="";
            location.href="/homehtml/homePage.html";
        }else {

            $("errorSpan").innerHTML="用户名或密码错误";
        }
    })

}